package com.navi.loaddata.core.mesEntity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;

/**
 * Created by ghost on 2018/3/15.
 */
@Entity
@Table(name = "SPC_DCDATA", schema = "P1RPTADM", catalog = "")
@IdClass(SpcDcDataPK.class)
public class SpcDcdata {
    private long dcdataid;
    private String dctype;
    private String materialtype;
    private String materialname;
    private String factoryname;
    private String subfactoryname;
    private String productspecname;
    private String eccode;
    private String processflowname;
    private String processoperationname;
    private String machinename;
    private String unitname;
    private String subunitname;
    private String recipename;
    private String runmode;
    private String ownercode;
    private String rtc;
    private String qtap;
    private String spcflag;
    private String psubentity;
    private String meslinkkey;
    private Timestamp processtime;
    private String lotname;
    private String proctype;
    private String eventname;
    private String timekey;
    private Date eventtime;
    private String eventuser;
    private String eventcomment;
    private Date updatetime;

    @Id
    @Column(name = "DCDATAID")
    public long getDcdataid() {
        return dcdataid;
    }

    public void setDcdataid(long dcdataid) {
        this.dcdataid = dcdataid;
    }

    @Basic
    @Column(name = "DCTYPE")
    public String getDctype() {
        return dctype;
    }

    public void setDctype(String dctype) {
        this.dctype = dctype;
    }

    @Id
    @Column(name = "MATERIALTYPE")
    public String getMaterialtype() {
        return materialtype;
    }

    public void setMaterialtype(String materialtype) {
        this.materialtype = materialtype;
    }

    @Basic
    @Column(name = "MATERIALNAME")
    public String getMaterialname() {
        return materialname;
    }

    public void setMaterialname(String materialname) {
        this.materialname = materialname;
    }

    @Basic
    @Column(name = "FACTORYNAME")
    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    @Id
    @Column(name = "SUBFACTORYNAME")
    public String getSubfactoryname() {
        return subfactoryname;
    }

    public void setSubfactoryname(String subfactoryname) {
        this.subfactoryname = subfactoryname;
    }

    @Basic
    @Column(name = "PRODUCTSPECNAME")
    public String getProductspecname() {
        return productspecname;
    }

    public void setProductspecname(String productspecname) {
        this.productspecname = productspecname;
    }

    @Basic
    @Column(name = "ECCODE")
    public String getEccode() {
        return eccode;
    }

    public void setEccode(String eccode) {
        this.eccode = eccode;
    }

    @Basic
    @Column(name = "PROCESSFLOWNAME")
    public String getProcessflowname() {
        return processflowname;
    }

    public void setProcessflowname(String processflowname) {
        this.processflowname = processflowname;
    }

    @Id
    @Column(name = "PROCESSOPERATIONNAME")
    public String getProcessoperationname() {
        return processoperationname;
    }

    public void setProcessoperationname(String processoperationname) {
        this.processoperationname = processoperationname;
    }

    @Basic
    @Column(name = "MACHINENAME")
    public String getMachinename() {
        return machinename;
    }

    public void setMachinename(String machinename) {
        this.machinename = machinename;
    }

    @Basic
    @Column(name = "UNITNAME")
    public String getUnitname() {
        return unitname;
    }

    public void setUnitname(String unitname) {
        this.unitname = unitname;
    }

    @Basic
    @Column(name = "SUBUNITNAME")
    public String getSubunitname() {
        return subunitname;
    }

    public void setSubunitname(String subunitname) {
        this.subunitname = subunitname;
    }

    @Basic
    @Column(name = "RECIPENAME")
    public String getRecipename() {
        return recipename;
    }

    public void setRecipename(String recipename) {
        this.recipename = recipename;
    }

    @Basic
    @Column(name = "RUNMODE")
    public String getRunmode() {
        return runmode;
    }

    public void setRunmode(String runmode) {
        this.runmode = runmode;
    }

    @Basic
    @Column(name = "OWNERCODE")
    public String getOwnercode() {
        return ownercode;
    }

    public void setOwnercode(String ownercode) {
        this.ownercode = ownercode;
    }

    @Basic
    @Column(name = "RTC")
    public String getRtc() {
        return rtc;
    }

    public void setRtc(String rtc) {
        this.rtc = rtc;
    }

    @Basic
    @Column(name = "QTAP")
    public String getQtap() {
        return qtap;
    }

    public void setQtap(String qtap) {
        this.qtap = qtap;
    }

    @Basic
    @Column(name = "SPCFLAG")
    public String getSpcflag() {
        return spcflag;
    }

    public void setSpcflag(String spcflag) {
        this.spcflag = spcflag;
    }

    @Basic
    @Column(name = "PSUBENTITY")
    public String getPsubentity() {
        return psubentity;
    }

    public void setPsubentity(String psubentity) {
        this.psubentity = psubentity;
    }

    @Basic
    @Column(name = "MESLINKKEY")
    public String getMeslinkkey() {
        return meslinkkey;
    }

    public void setMeslinkkey(String meslinkkey) {
        this.meslinkkey = meslinkkey;
    }

    @Id
    @Column(name = "PROCESSTIME")
    public Timestamp getProcesstime() {
        return processtime;
    }

    public void setProcesstime(Timestamp processtime) {
        this.processtime = processtime;
    }

    @Basic
    @Column(name = "LOTNAME")
    public String getLotname() {
        return lotname;
    }

    public void setLotname(String lotname) {
        this.lotname = lotname;
    }

    @Basic
    @Column(name = "PROCTYPE")
    public String getProctype() {
        return proctype;
    }

    public void setProctype(String proctype) {
        this.proctype = proctype;
    }

    @Basic
    @Column(name = "EVENTNAME")
    public String getEventname() {
        return eventname;
    }

    public void setEventname(String eventname) {
        this.eventname = eventname;
    }

    @Basic
    @Column(name = "TIMEKEY")
    public String getTimekey() {
        return timekey;
    }

    public void setTimekey(String timekey) {
        this.timekey = timekey;
    }

    @Basic
    @Column(name = "EVENTTIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getEventtime() {
        return eventtime;
    }

    public void setEventtime(Date eventtime) {
        this.eventtime = eventtime;
    }

    @Basic
    @Column(name = "EVENTUSER")
    public String getEventuser() {
        return eventuser;
    }

    public void setEventuser(String eventuser) {
        this.eventuser = eventuser;
    }

    @Basic
    @Column(name = "EVENTCOMMENT")
    public String getEventcomment() {
        return eventcomment;
    }

    public void setEventcomment(String eventcomment) {
        this.eventcomment = eventcomment;
    }

    @Basic
    @Column(name = "UPDATETIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SpcDcdata that = (SpcDcdata) o;

        if (dcdataid != that.dcdataid) return false;
        if (dctype != null ? !dctype.equals(that.dctype) : that.dctype != null) return false;
        if (materialtype != null ? !materialtype.equals(that.materialtype) : that.materialtype != null) return false;
        if (materialname != null ? !materialname.equals(that.materialname) : that.materialname != null) return false;
        if (factoryname != null ? !factoryname.equals(that.factoryname) : that.factoryname != null) return false;
        if (subfactoryname != null ? !subfactoryname.equals(that.subfactoryname) : that.subfactoryname != null)
            return false;
        if (productspecname != null ? !productspecname.equals(that.productspecname) : that.productspecname != null)
            return false;
        if (eccode != null ? !eccode.equals(that.eccode) : that.eccode != null) return false;
        if (processflowname != null ? !processflowname.equals(that.processflowname) : that.processflowname != null)
            return false;
        if (processoperationname != null ? !processoperationname.equals(that.processoperationname) : that.processoperationname != null)
            return false;
        if (machinename != null ? !machinename.equals(that.machinename) : that.machinename != null) return false;
        if (unitname != null ? !unitname.equals(that.unitname) : that.unitname != null) return false;
        if (subunitname != null ? !subunitname.equals(that.subunitname) : that.subunitname != null) return false;
        if (recipename != null ? !recipename.equals(that.recipename) : that.recipename != null) return false;
        if (runmode != null ? !runmode.equals(that.runmode) : that.runmode != null) return false;
        if (ownercode != null ? !ownercode.equals(that.ownercode) : that.ownercode != null) return false;
        if (rtc != null ? !rtc.equals(that.rtc) : that.rtc != null) return false;
        if (qtap != null ? !qtap.equals(that.qtap) : that.qtap != null) return false;
        if (spcflag != null ? !spcflag.equals(that.spcflag) : that.spcflag != null) return false;
        if (psubentity != null ? !psubentity.equals(that.psubentity) : that.psubentity != null) return false;
        if (meslinkkey != null ? !meslinkkey.equals(that.meslinkkey) : that.meslinkkey != null) return false;
        if (processtime != null ? !processtime.equals(that.processtime) : that.processtime != null) return false;
        if (lotname != null ? !lotname.equals(that.lotname) : that.lotname != null) return false;
        if (proctype != null ? !proctype.equals(that.proctype) : that.proctype != null) return false;
        if (eventname != null ? !eventname.equals(that.eventname) : that.eventname != null) return false;
        if (timekey != null ? !timekey.equals(that.timekey) : that.timekey != null) return false;
        if (eventtime != null ? !eventtime.equals(that.eventtime) : that.eventtime != null) return false;
        if (eventuser != null ? !eventuser.equals(that.eventuser) : that.eventuser != null) return false;
        if (eventcomment != null ? !eventcomment.equals(that.eventcomment) : that.eventcomment != null) return false;
        if (updatetime != null ? !updatetime.equals(that.updatetime) : that.updatetime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (dcdataid ^ (dcdataid >>> 32));
        result = 31 * result + (dctype != null ? dctype.hashCode() : 0);
        result = 31 * result + (materialtype != null ? materialtype.hashCode() : 0);
        result = 31 * result + (materialname != null ? materialname.hashCode() : 0);
        result = 31 * result + (factoryname != null ? factoryname.hashCode() : 0);
        result = 31 * result + (subfactoryname != null ? subfactoryname.hashCode() : 0);
        result = 31 * result + (productspecname != null ? productspecname.hashCode() : 0);
        result = 31 * result + (eccode != null ? eccode.hashCode() : 0);
        result = 31 * result + (processflowname != null ? processflowname.hashCode() : 0);
        result = 31 * result + (processoperationname != null ? processoperationname.hashCode() : 0);
        result = 31 * result + (machinename != null ? machinename.hashCode() : 0);
        result = 31 * result + (unitname != null ? unitname.hashCode() : 0);
        result = 31 * result + (subunitname != null ? subunitname.hashCode() : 0);
        result = 31 * result + (recipename != null ? recipename.hashCode() : 0);
        result = 31 * result + (runmode != null ? runmode.hashCode() : 0);
        result = 31 * result + (ownercode != null ? ownercode.hashCode() : 0);
        result = 31 * result + (rtc != null ? rtc.hashCode() : 0);
        result = 31 * result + (qtap != null ? qtap.hashCode() : 0);
        result = 31 * result + (spcflag != null ? spcflag.hashCode() : 0);
        result = 31 * result + (psubentity != null ? psubentity.hashCode() : 0);
        result = 31 * result + (meslinkkey != null ? meslinkkey.hashCode() : 0);
        result = 31 * result + (processtime != null ? processtime.hashCode() : 0);
        result = 31 * result + (lotname != null ? lotname.hashCode() : 0);
        result = 31 * result + (proctype != null ? proctype.hashCode() : 0);
        result = 31 * result + (eventname != null ? eventname.hashCode() : 0);
        result = 31 * result + (timekey != null ? timekey.hashCode() : 0);
        result = 31 * result + (eventtime != null ? eventtime.hashCode() : 0);
        result = 31 * result + (eventuser != null ? eventuser.hashCode() : 0);
        result = 31 * result + (eventcomment != null ? eventcomment.hashCode() : 0);
        result = 31 * result + (updatetime != null ? updatetime.hashCode() : 0);
        return result;
    }
}
